{% extends 'layout.html' %}
{% load static %}

{% block link %}
    <link rel="stylesheet" href="{% static 'plugins/bootstrap-datepicker-1.9.0/css/bootstrap-datepicker.min.css' %}">
{% endblock %}

{% block content %}
        <div class="card" style="margin-top: 30px;">
            <div class="card-header">
                <h3>新建用户</h3>
            </div>
            <div class="card-body">
                <form method="post" novalidate>
                    {% csrf_token %}

                    {% for field in form %}
                        <div class="mb-3">
                            <label  class="form-label">{{ field.label }}</label>
<!--                        <input type="text" class="form-control" id="title" name="title" placeholder="部门名称">-->
                            {{ field }}
                            <span style="color: red;">{{ field.errors.0 }}</span>
                        </div>
                    {% endfor %}
                    <button type="submit" class="btn btn-primary">提 交</button>
                </form>
            </div>
        </div>
{% endblock %}



{% block js %}
    <script src="{% static 'plugins/bootstrap-datepicker-1.9.0/js/bootstrap-datepicker.js' %}"></script>
    <script src="{% static 'plugins/bootstrap-datepicker-1.9.0/locales/bootstrap-datepicker.zh-CN.min.js' %}"></script>
    <script>
        $(function () {
            $('#id_create_time').datepicker({
                format: 'yyyy-mm-dd',
                language: "zh-CN",
                autoclose: true,
                clearBtn: true,
            });

        })
    </script>
{% endblock %}
